Skip to content

test(nextjs): Run nextjs-16-tunnel on Cloudflare - #25161

Open
JPeer264 wants to merge 1 commit into
jp/vinext-e2e-testsfrom
jp/nextjs-16-tunnel-cloudflare
Open

JPeer264 wants to merge 1 commit into
jp/vinext-e2e-testsfrom
jp/nextjs-16-tunnel-cloudflare

Conversation

@JPeer264

@JPeer264 JPeer264 commented Oct 8, 2026

Copy link
Copy Markdown
Member

follow up to #24998

Description

This adds an optional Cloudflare (OpenNext) variant to nextjs-16-tunnel, so the tunnel route tests also run on Workers with withSentry from @sentry/nextjs/cloudflare.

Why

Only unit tests covered that withSentry does not sample requests to the tunnel route. The Worker sends its spans to the proxy server, so the existing check for middleware spans of tunnel requests fails when a tunnel request is sampled.

@JPeer264
JPeer264 added this pull request to stack #25035 October 8, 2026 09:03
@github-actions

github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

size-limit report 📦

⚠️ Warning: Base artifact is not the latest one, because the latest workflow run is not done yet. This may lead to incorrect results. Try to re-run all tests to get up to date results.

Path Size % Change Change
@sentry/browser 29.8 kB - -
@sentry/browser - with treeshaking flags 27.92 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 27.84 kB - -
@sentry/browser (incl. Tracing) 51.85 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 51.87 kB - -
@sentry/browser (incl. Tracing, Profiling) 54.8 kB - -
@sentry/browser (incl. Tracing, Replay) 91.58 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 80.45 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 96.29 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 109.27 kB - -
@sentry/browser (incl. Feedback) 47.32 kB - -
@sentry/browser (incl. sendFeedback) 34.84 kB - -
@sentry/browser (incl. FeedbackAsync) 39.95 kB - -
@sentry/browser (incl. Metrics) 30.82 kB - -
@sentry/browser (incl. Logs) 31.11 kB - -
@sentry/browser (incl. Metrics & Logs) 31.75 kB - -
@sentry/react 31.63 kB - -
@sentry/react (incl. Tracing) 54.17 kB - -
@sentry/vue 37.84 kB - -
@sentry/vue (incl. Tracing) 54.78 kB - -
@sentry/svelte 29.83 kB - -
@sentry/remix (Remix 3 client bundle) 56.83 kB - -
CDN Bundle 31.53 kB - -
CDN Bundle (incl. Tracing) 52.34 kB - -
CDN Bundle (incl. Logs, Metrics) 33.72 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 54.3 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 74.65 kB - -
CDN Bundle (incl. Tracing, Replay) 90.01 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 91.96 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 96.17 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 98.15 kB - -
CDN Bundle - uncompressed 92.92 kB - -
CDN Bundle (incl. Tracing) - uncompressed 155.46 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 99.46 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 161.41 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 229.5 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 275.63 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 281.57 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 289.33 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 295.26 kB - -
@sentry/nextjs (client) 56.53 kB - -
@sentry/sveltekit (client) 52.23 kB - -
@sentry/core/server 40.86 kB +0.01% +1 B 🔺
@sentry/core/browser 13.71 kB - -
@sentry/node 145.89 kB +0.01% +8 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 83.33 kB - -
@sentry/node - without tracing 93.69 kB +0.01% +9 B 🔺
@sentry/node - without channel injection 124.04 kB +0.01% +9 B 🔺
@sentry/aws-serverless 101.91 kB +0.01% +4 B 🔺
@sentry/cloudflare (withSentry) - minified 209.71 kB -0.01% -3 B 🔽
@sentry/cloudflare (withSentry) 519.94 kB -0.01% -3 B 🔽
@sentry/nextjs/cloudflare (withSentry) - minified 227.38 kB added added

View base workflow run

@JPeer264
JPeer264 marked this pull request as ready for review October 8, 2026 09:33
@JPeer264 JPeer264 self-assigned this Oct 8, 2026
@JPeer264
JPeer264 force-pushed the jp/nextjs-16-tunnel-cloudflare branch from c46d2b7 to 4d3f791 Compare October 8, 2026 10:25
nextjs-16-tunnel gets an optional Cloudflare variant that builds with
`opennextjs-cloudflare` and wraps the Worker in `worker.ts` with
`withSentry` from `@sentry/nextjs/cloudflare`. The tunnel route tests then
also run on Workers.

The Worker sends its spans to the proxy server through `tunnel`, so the
check that tunnel requests create no middleware spans sees the spans of the
Worker. Without the tunnel route handling of `withSentry`, a tunnel request
is sampled and this check fails.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JPeer264
JPeer264 force-pushed the jp/nextjs-16-tunnel-cloudflare branch from 4d3f791 to c9fcf8b Compare October 8, 2026 11:28

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants